import java.util.Scanner;
//6.17 一次做出来 继续加油
//思想：利用substring函数进行字符串截取
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine(); //输入字符串
        String newStr = "";
        int i = 0;
        while(i < str.length()){
            newStr = str.substring(0,i)+str.substring(i+1);
            if(isPalindrome(newStr)){
                System.out.println(newStr);
                return ;
            }
            i++;
        }
        System.out.println("false");
        
    }
    
    //判断字符串是否为回文串
    public static boolean isPalindrome(String str){
        char[] arr = str.toCharArray(); //转为字符数组
        int start = 0, end = arr.length-1;
        while(start < end){
            if(arr[start] != arr[end]){
                return false;
            }
            start++;
            end--;
        }
        return true;
    }
}